<?php

$ar = '12312321sdfas';

var_dump(ctype_alnum($ar));

die;